﻿using JStore.Core.Entities;
using JStore.Data.Daos;

namespace JStore.Tasks
{
	/// <summary>
	///
	/// </summary>
	public class UserPasswordTask
	{
		private readonly UserPasswordDao _userPasswordDao = new UserPasswordDao();

	    public UserPassword GetByUserName(string userName)
	    {
	        return _userPasswordDao.GetByUserName(userName);
	    }

	    public bool ExistsPower(string logOnUserName, int powerId)
	    {
	        return _userPasswordDao.ExistsPower(logOnUserName, powerId);
	    }

	    public void Update(UserPassword userPassword)
	    {
	        _userPasswordDao.Update(userPassword);
	    }

	    public bool ExistsUser(string userName)
	    {
	        return _userPasswordDao.ExistsUser(userName);
	    }
         
	}
}

